// import Fabao from '../components/engineering/fabao-dialog'
// import Wuliao from '../components/engineering/wuliao-dialog'
// import Shigongtu from '../components/engineering/shigongtu-dialog'
// import Jungongtu from '../components/engineering/jungongtu-dialog'
// import Baogao from '../components/engineering/baogao-dialog'
// import Jihua from '../components/engineering/jihua-dialog'
// import Warehousing from '../components/engineering/warehousing-dialog'
// import Fund from '../components/engineering/fund-dialog'
// import Finish from '../components/engineering/finish-dialog'
// import Accept from '../components/engineering/accept-dialog'
// import Warranty from '../components/engineering/warranty-dialog'
// import Supplier from '../components/purchase/supplier-dialog'
// import Inquiry from '../components/purchase/inquiry-dialog'
// import EO from '../components/purchase/eo-dialog'
// import Reduction from '../components/finance/reduction-dialog'
// import Additional from '../components/finance/additional-dialog'
// import Deduction from '../components/finance/deduction-dialog'
// import Payment from '../components/finance/payment-dialog'
// import Expend from '../components/finance/expend-dialog'
// import Voucher from '../components/finance/voucher-dialog'
// import Temporary from '../components/finance/temporary-dialog'
// import Reimbursement from '../components/finance/reimbursement-dialog'
// import Invoicing from '../components/finance/invoicing-dialog'
// import Leave from '../components/administration/leave-dialog'
// import Travel from '../components/administration/travel-dialog'
// import Out from '../components/administration/out-dialog'
// import Overtime from '../components/administration/overtime-dialog'
// import Cart from '../components/administration/cart-dialog'
// import Dormitory from '../components/administration/dormitory-dialog'
// import Seal from '../components/administration/seal-dialog'
// import Loss from '../components/administration/loss-dialog'
// import Become from '../components/administration/become-dialog'
// import Quit from '../components/administration/quit-dialog'

export default {
  // components: { Fabao, Wuliao, Shigongtu, Jungongtu, Baogao, Jihua, Fund, Finish, Accept, Warranty,
  //   Supplier, Inquiry, EO, Warehousing, Leave, Travel, Out, Overtime, Cart, Dormitory, Seal, Loss, Become, Quit,
  //   Reduction, Additional, Deduction, Payment, Expend, Voucher, Temporary, Reimbursement, Invoicing },
  inject: ['app'],
  provide() {
    return {
      app: this
    }
  },
  data() {
    return {
      dialog: {
        edit: {},
        title: '',
        type: ''
      }
    }
  },
  methods: {
    handleDialog(e) {
      this.dialog.title = e.dTitle ? e.dTitle : ''
      this.dialog.type = e.dType ? e.dType : ''
      this.dialog.edit = {}
      this.app.dialogParam(this.dialog.edit, e.dField ? e.dField : [], e)
      this.$refs[e.dRef ? e.dRef : 'dialog'].visible = true
    }
  }
}
